package
{
	import TenoriOn.TenoriOn;
	import TenoriOn.UI.Buttons.icons.CloseButton;
	
	import flash.desktop.NativeApplication;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.MouseEvent;
	import flash.ui.Multitouch;
	import flash.ui.MultitouchInputMode;
	
	public class Window extends Sprite
	{
		public function Window()
		{
			Multitouch.inputMode=MultitouchInputMode.TOUCH_POINT;
			stage.scaleMode=StageScaleMode.NO_SCALE;
			stage.align=StageAlign.TOP_LEFT;
			
			var background:Sprite=new Sprite();
			background.graphics.beginFill(0x222222);
			background.graphics.drawRoundRect(0,0,1012,680,40,40);
			background.addEventListener(MouseEvent.MOUSE_DOWN,function(event:MouseEvent):void{stage.nativeWindow.startMove()});
			addChild(background);
			
			var closeBtn:CloseButton=new CloseButton();
			closeBtn.x=962;
			closeBtn.y=10;
			closeBtn.addEventListener(MouseEvent.CLICK,function(event:MouseEvent):void{NativeApplication.nativeApplication.exit()});
			addChild(closeBtn);
			
			var tenoriOn:TenoriOn=new TenoriOn();
			tenoriOn.x=20;
			tenoriOn.y=20;
			addChild(tenoriOn);
		}
	}
}